package com.itheima.demo01;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class Demo {

    public static void main(String[] args) throws IOException {

        OutputStream outputStream = new FileOutputStream("day10\\a.txt");

        //一次写一个字节
        //outputStream.write(48);

        //一次写一个字节数组
        /*byte[] bytes = {48,49,50,51,52};
        outputStream.write(bytes);*/

        //一次写一个字节数组的一部分
        byte[] bytes = {48,49,50,51,52};
        outputStream.write(bytes,0,3);

        outputStream.close();
    }
}
